Repository navigation
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5545 +/- ##
==========================================
- Coverage 66.00% 65.97% -0.04%
==========================================
Files 2808 2881 +73
Lines 113150 114159 +1009
Branches 31708 31978 +270
==========================================
+ Hits 74689 75315 +626
- Misses 36649 37027 +378
- Partials 1812 1817 +5
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
bcbab2a to
e8371dd
Compare
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 10:19 AM UTC · Completed 10:56 AM UTC Commit: Runtime: claude · Model: claude-opus-4-6 · Effort: high · Cost: $15.27 |
|
Risk Assessment: elevated (3/5) DetailsA large-scope migration (127 files, 10K+ lines, 3 dependency files changed, large blast radius) in a workspace with high author diversity and many recent regression commits yields an elevated composite score of ~2.90, rounded to 3, despite the absence of protected or security-sensitive paths. |
ReviewFindingsHigh
Medium
Low
Next steps:
|
There was a problem hiding this comment.
Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:
workspaces/app-defaults/packages/app/src/modules/drawer-demo/HelpDrawerMenuItem.tsx(file-level): Line 91 · [low] scope-creep
The drawer-demo HelpDrawerMenuItem icon changed from 'support' to 'help', a UI change bundled into a migration PR without mention in the changeset.
workspaces/app-defaults/plugins/app-defaults/README.md(file-level): Line 149 · [low] missing-coverage
The Usage section says 'Static: import appDefaultsModule' but does not mention that the static path now also requires importing the global header modules. The new Global Header section covers manual registration but is not cross-referenced from the Static usage section.
Suggested fix: Add a cross-reference from the Static usage line to the Global Header section.
| navigate(searchLink); | ||
| } else if (currentHighlight !== -1) { | ||
| navigate( | ||
| results[highlightedIndex]?.document?.location ?? searchLink, |
There was a problem hiding this comment.
[medium] logic-error
Stale-closure bug in Enter key handler: the condition on line 114 correctly reads currentHighlight from highlightedIndexRef.current (the ref), but the actual array lookup on line 116 uses highlightedIndex (the state variable captured by the render-time closure). If a highlight change occurs after the last render but before Enter, navigation may go to the wrong result.
Suggested fix: Replace results[highlightedIndex] with results[currentHighlight] on line 116.
| * @public | ||
| */ | ||
| export const globalHeaderComponentDataRef = | ||
| createExtensionDataRef<GlobalHeaderComponentData>().with({ |
There was a problem hiding this comment.
[medium] duplicate-public-api-identifiers
The new app-react package publishes globalHeaderComponentDataRef (ID: 'global-header.component') and globalHeaderMenuItemDataRef (ID: 'global-header.menu-item'). The unchanged global-header package already publishes refs with identical string IDs but as separate JavaScript objects. Extensions built against the old package's refs may not attach to the new module's inputs if Backstage resolves by object identity rather than string ID.
Suggested fix: Document the migration path: plugins contributing header items must switch their import from the standalone package to app-react.
| * | ||
| * @public | ||
| */ | ||
| export interface ToolbarComponentParams { |
There was a problem hiding this comment.
[medium] naming-conventions
The public params interface ToolbarComponentParams does not follow the GlobalHeader prefix convention used by every other public type in this package.
Suggested fix: Rename ToolbarComponentParams to GlobalHeaderComponentParams.
|
|
||
| const fetchUnreadCount = async () => { | ||
| try { | ||
| const { notifications } = await notificationsApi.getNotifications({ |
There was a problem hiding this comment.
[low] edge-case
The unread notification count derived from notifications.length may cap at the page-size limit if the notifications API applies one.
| const logoURI = | ||
| (typeof logoURLs === 'string' ? logoURLs : null) ?? | ||
| (typeof logoURLs === 'object' | ||
| ? logoURLs?.[themeId!] ?? logoURLs?.[themeVariant!] |
There was a problem hiding this comment.
[low] nil-handling
Non-null assertions themeId! and themeVariant! suppress TypeScript's null-safety checks on values that can be undefined.
Suggested fix: Remove the ! assertions and use optional chaining.
| @@ -0,0 +1,5 @@ | |||
| --- | |||
There was a problem hiding this comment.
[low] scope-creep
The quickstart workspace icon alias change belongs to a different workspace with its own release lifecycle. The PR bundles two workspace changesets without explaining why they must ship together.
| if (params.component) { | ||
| return resolveSyncComponent(node, params.component); | ||
| } | ||
| throw new Error( |
There was a problem hiding this comment.
[low] public-api-unreachable-error
resolveToolbarComponent() contains a throw that is unreachable because the factory only calls it when hasCustomUi is true.
Suggested fix: Remove the dead throw branch or restructure the call.
| size?: 'small' | 'medium' | 'large'; | ||
| title: string; | ||
| titleKey?: string; | ||
| to: string; |
There was a problem hiding this comment.
[low] public-interface-inconsistency
HeaderIconButtonProps requires to: string as mandatory, but the data model allows click-only toolbar items via onClick. External consumers cannot use GlobalHeaderIconButton for click-only behaviors.
Suggested fix: Make to optional and render a plain button when absent.
508f967 to
938354e
Compare
|
This pull request adds a new top-level directory under |
Drop workspaces/global-header now that global header lives inside the app-defaults plugin (src/global-header). Archive the discontinued @red-hat-developer-hub/backstage-plugin-global-header package and update CODEOWNERS, labels, codecov, catalog, and renovate paths accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
938354e to
e1775cb
Compare
Park the global-header fixture plugin in a dedicated test-plugins workspace now that the standalone global-header workspace is gone. Co-authored-by: Cursor <cursoragent@cursor.com>
e1775cb to
4a1242d
Compare
72b5c58 to
6c92fb4
Compare
6c92fb4 to
904b4a1
Compare
|



Hey, I just made a Pull Request!
Resolves:
https://redhat.atlassian.net/browse/RHIDP-17734
Part of : https://redhat.atlassian.net/browse/RHIDP-17735
Solution description:
Fold the standalone global-header experience into the app-defaults stack by splitting extension APIs from the default UI:
Docs + changeset covering enable/disable, contribution patterns, and the API split; icons moved to Remix/IconElement where applicable.
Note: Deprecation of the original plugin will be handled as part of https://redhat.atlassian.net/browse/RHIDP-17736
Screenshots:
Tested on rhdh-local
✔️ Checklist